package com.cljh.mapper;

import com.cljh.bean.Admin;
import com.cljh.bean.Calendar;
import com.cljh.bean.Saler;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SalerMapper {


    int save(@Param("saler") Saler saler);

    @Delete("delete from mtmall_test.saler where mtmall_test.saler.admin_id =#{saler.adminId};")
    int delete(Integer id);

    int upd(@Param("saler") Saler saler);

    @Select("select * from mtmall_test.saler ;")
    List<Saler> selectAll();

    Saler selectByAdminId(@Param("adminId") Integer adminId);

    List<Saler> selectAllByCondition(@Param("begin")Integer begin, @Param("size") Integer size, @Param("admin") Admin admin);

    int  selectCount(@Param("admin") Admin admin);
}
